package chapter5.section6;

//程序5-15：一个具有static修饰属性的内部类
public class OuterClass2 {
    private String name;
    private String state;

    public OuterClass2(String name, String state) {
        super();
        this.name = name;
        this.state = state;
    }

    private void say() {
        System.out.println("外部：" + name + "的状态是" + state);
    }

    static class InnerClass {
        public void alarm() {
            System.out.println("static内部类无法使用OuterClass" +
                    "的非static修饰的属性和方法");
        }
    }
}
